package cn.zcq100.Proxp.Demo2;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class InvokationHandle implements InvocationHandler {

	private Object proxied;
		
	public InvokationHandle(Object proxied){
		this.proxied=proxied;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("ClassName:"+proxy.getClass()+"   Method:"+method+"   arg:"+args);
		if(args!=null)
		for(Object obj:args){
			System.out.println(obj+"  ");
		}
		return method.invoke(proxied, args);
	}

}
